<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('home');
    $router->resource('coupons', CouponController::class);
    $router->resource('orders', OrderController::class);
    $router->resource('categories', CategoryController::class);
    $router->resource('developers', DeveloperController::class);
    $router->resource('users', UserController::class);
    $router->resource('products', ProductController::class);
    $router->resource('coupon-types', CouponTypeController::class);
    $router->resource('sms-send-errors', SmsSendErrorController::class);
    $router->resource('suning-api-logs', SuningApiLogErrorController::class);
    $router->resource('unicom-api-logs', UnicomApiLogErrorController::class);
    $router->resource('comments', CommentController::class);
    $router->resource('order-pingans', OrderPinganController::class);



    $router->get('/api_imitate/unicome', 'ApiImitateController@unicome');
    $router->get('/api_imitate/suning', 'ApiImitateController@suning');
    $router->post('/api_imitate/handle', 'ApiImitateController@handle');
    $router->get('/demo', 'HomeController@demo')->name('demo');
});
